import { defineConfig } from "vite";
import uni from "@dcloudio/vite-plugin-uni";
import VueDevTools from "vite-plugin-vue-devtools";

export default defineConfig(async ({ command }) => {
  const UnoCSS = (await import('unocss/vite')).default;
  const checker = (await import('vite-plugin-checker')).default;
  return {
    // base: command === "serve" ? "/" : "/mobile/",
    plugins: [
      VueDevTools(),
      uni(),
      UnoCSS(),
      checker({ vueTsc: true })
    ],
  };
});
